﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using System.IO;

namespace Dingding.Helper
{
    public class StringUtil
    {
        //字符串头尾互变
        public static string first_to_last(string str)
        {
            char[] chars = str.ToCharArray();

            char[] strResult = str.ToCharArray();
            int length = chars.Length;

            //2.字母识别错误问题；******************************************************************
            for (int i = 0; i < length; i++)
            {
                strResult[i] = chars[length - i - 1];
            }
           // strResult[length] = '\0';

            string str2 = new string(strResult);

            //9,6互换；
            str2 = str2.Replace("6", "#");
            str2 = str2.Replace("9", "6");
            str2 = str2.Replace("#", "9");


            //若是炉号的话，则S需要转换字母5；

            return str2;
        }
        
    }
}